<!DOCTYPE html>
<html>

<head>
    <title>批量发券</title>
    <#include "/header.html">
</head>

<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="row clearfix">
            <div class="col-md-6 col-md-offset-1">
                <form class="form-horizontal">
                    <div class="form-group">
                        <div class="col-sm-4 control-label"><span style="color: red">*&nbsp;</span>发放方式</div>
                        <div class="col-sm-8">
                            <el-select v-model="sendCouponType" placeholder="请选择">
                                <el-option v-for="item in sendCouponTypeEnum" :key="item.value" :label="item.describe" :value="item.value">
                                </el-option>
                            </el-select>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-4 control-label"><span style="color: red">*&nbsp;</span>选择批量发送类型</div>
                        <div class="col-sm-8">
                            <el-select v-model="sendType" placeholder="请选择">
                                <el-option v-for="item in typeOptions" :key="item.value" :label="item.label" :value="item.value">
                                </el-option>
                            </el-select>
                        </div>
                    </div>
                    <div class="form-group" v-if="sendType=='coupon'">
                        <div class="col-sm-4 control-label"><span style="color: red">*&nbsp;</span>优惠券名称</div>
                        <div class="col-sm-8">
                            <el-select v-model="couponIds" multiple placeholder="请选择">
                                <el-option v-for="item in couponList" :key="item.id" :label="item.name" :value="item.id">
                                </el-option>
                            </el-select>
                        </div>
                    </div>
                    <div class="form-group" v-if="sendType=='pay'">
                        <div class="col-sm-4 control-label"><span style="color: red">*&nbsp;</span>支付券名称</div>
                        <div class="col-sm-8">
                            <el-select v-model="couponIds" multiple placeholder="请选择">
                                <el-option v-for="item in payList" :key="item.id" :label="item.name" :value="item.id">
                                </el-option>
                            </el-select>
                        </div>
                    </div>
                    <div v-if="sendCouponType=='userType'">
                        <div class="form-group">
                            <div class="col-sm-4 control-label"><span style="color: red">*&nbsp;</span>用户类型</div>
                            <div class="col-sm-8">
                                <el-select v-model="userType" placeholder="请选择">
                                    <el-option label="普通" value="common,shop,company,designer,other,inside"></el-option>
                                    <el-option label="商户" value="supplier,pop"></el-option>
                                </el-select>
                            </div>
                        </div>
                    </div>
                    <div v-if="sendCouponType=='userSource'">
                        <div class="form-group">
                            <div class="col-sm-4 control-label"><span style="color: red">*&nbsp;</span>平台来源</div>
                            <div class="col-sm-8">
                                <el-select multiple v-model="userSource" placeholder="请选择">
                                    <el-option label="pc" value="pc"></el-option>
                                    <el-option label="wap" value="wap"></el-option>
                                    <el-option label="small_program" value="small_program"></el-option>
                                    <el-option label="android" value="android"></el-option>
                                    <el-option label="ios" value="ios"></el-option>
                                    <el-option label="erp" value="erp"></el-option>
                                    <el-option label="pop" value="pop"></el-option>
                                </el-select>
                            </div>
                        </div>
                    </div>
                    <div v-if="sendCouponType=='userLevel'">
                        <div class="form-group">
                            <div class="col-sm-4 control-label"><span style="color: red">*&nbsp;</span>用户等级</div>
                            <div class="col-sm-8">
                                <el-select multiple v-model="userlevel" placeholder="请选择">
                                    <el-option label="贵宾会员" value="1"></el-option>
                                    <el-option label="黄金会员" value="2"></el-option>
                                    <el-option label="白金会员" value="3"></el-option>
                                    <el-option label="特殊贵宾" value="4"></el-option>
                                    <el-option label="测试VIP" value="5"></el-option>
                                </el-select>
                            </div>
                        </div>
                    </div>
                    <div v-if="sendCouponType=='userIds'">
                        <div class="form-group">
                            <div class="col-sm-4 control-label"></div>
                            <div class="col-sm-8">
                                <span style="color: red">注意:请在下方填入会员ID,不支持手机号码,用户名等!</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-4 control-label"><span style="color: red">*&nbsp;</span>待发券会员ID</div>
                            <div class="col-sm-8">
                                <textarea v-model="userIds" style="width: 400px; height: 115px" placeholder="请输入正确的会员ID,以逗号分隔.如888390,888391"></textarea>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-4 control-label"><span style="color: red">*&nbsp;</span>每个优惠卷发放数量</div>
                        <div class="col-sm-8">
                            <el-input type="number" v-model="quantity" placeholder="请输入内容"></el-input>
                        </div>
                    </div>
                </form>
            </div>
            <div class="col-md-12">
                <div class="col-md-6 col-md-offset-2">
                    <el-button type="primary" @click="sumbit">确定</el-button>
                    <el-button @click="clear" type="primary">清空</el-button>
                </div>
            </div>
        </div>
    </div>

</div>

<script src="${request.contextPath}/statics/js/modules/promotion/batchSendCoupon.js?_${.now?long}"></script>
</body>

</html>
